load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

RULES_JVM_EXTERNAL_TAG = "4.1"

RULES_JVM_EXTERNAL_SHA = "f36441aa876c4f6427bfb2d1f2d723b48e9d930b62662bf723ddfb8fc80f0140"

http_archive(
    name = "rules_jvm_external",
    sha256 = RULES_JVM_EXTERNAL_SHA,
    strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
    url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@rules_jvm_external//:specs.bzl", "maven")

maven_install(
    artifacts = [
        "org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot-starter-actuator:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot-test-autoconfigure:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot-starter-web:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot-dependencies:2.0.5.RELEASE",
        "org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE",
         maven.artifact(
               "org.springframework.data",
               "spring-data-redis",
               "2.0.5.RELEASE",
               exclusions = [
                   "org.springframework.boot:spring-boot-dependencies",
               ],
           ),
        "org.springframework:spring-web:5.0.5.RELEASE",
        "org.springframework:spring-core:5.0.5.RELEASE",
        "org.springframework:spring-beans:5.0.5.RELEASE",
        "org.springframework:spring-context:5.0.5.RELEASE",
        "org.springframework:spring-aop:5.0.5.RELEASE",
        "org.springframework:spring-tx:5.0.5.RELEASE",
        "org.springframework:spring-jdbc:5.0.5.RELEASE",
        "org.springframework:spring-expression:5.0.5.RELEASE",


#        "org.springframework:spring-test:5.0.5.RELEASE",
        "org.projectlombok:lombok:1.18.20",

        #redis
        maven.artifact(
            "org.redisson",
            "redisson-spring-boot-starter",
            "3.16.1",
            exclusions = [
                "org.springframework.boot:spring-boot-starter-actuator",
                "org.springframework.boot:spring-boot-starter-data-redis",
                "org.redisson:redisson",
                "org.redisson:redisson-spring-data-25",
            ]
        ),

            maven.artifact(
                "org.redisson",
                "redisson-spring-data-20",
                "3.16.1",
                exclusions = [
                    "org.springframework.data:spring-data-redis",
                ]
            ),
        "org.redisson:redisson:3.16.1",

        #mybatis
        maven.artifact(
            "com.baomidou",
            "mybatis-plus-boot-starter",
            "3.4.2",
            exclusions = [
                "org.springframework.boot:spring-boot-autoconfigure",
                "org.springframework.boot:spring-boot-starter-jdbc",
            ],
        ),
        "org.mybatis:mybatis-spring:2.0.5",

        #jdbc
        "mysql:mysql-connector-java:5.1.47",
        "com.zaxxer:HikariCP:2.7.9",

        "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.6",
        "com.fasterxml.jackson.core:jackson-core:2.9.6",
        "com.fasterxml.jackson.core:jackson-databind:2.9.6",
        "com.fasterxml.jackson.core:jackson-annotations:2.9.0",

        "org.slf4j:slf4j-api:1.7.25",
    ],
    fetch_sources = True,
#    maven_install_json = "//:maven_install.json",
    repositories = [
        "https://repo1.maven.org/maven2",
    ],
)